<<<<<<< HEAD
=======
#!/bin/bash

# todo web_chat_ems_2019_07 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/nev?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from web_chat_ems_2019_07 where 1=1 and create_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table web_chat_ems_2019_07 \
-m 1

<<<<<<< HEAD
=======
# todo web_chat_text_ems_2019_07 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/nev?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from web_chat_text_ems_2019_07 where 1=1 and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table web_chat_text_ems_2019_07 \
-m 1

>>>>>>> 224bc8d068e8b57188cd68c6a2b6bef295c4acc9
# todo customer 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from customer where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table customer \
-m 1

# todo customer_appeal 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from customer_appeal where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table customer_appeal \
-m 1

# todo customer_clue 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from customer_clue where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table customer_clue \
-m 1

# todo customer_relationship 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from customer_relationship where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table customer_relationship \
-m 1

# todo employee 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
<<<<<<< HEAD
--query "select *,'2019-12-24' as dt from employee where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
=======
--query "select * from employee where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
>>>>>>> 224bc8d068e8b57188cd68c6a2b6bef295c4acc9
--hcatalog-database edu_ods \
--hcatalog-table employee \
-m 1

# todo itcast_clazz 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
<<<<<<< HEAD
--query "select *,'2019-12-24' as dt from itcast_clazz where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
=======
--query "select * from itcast_clazz where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
>>>>>>> 224bc8d068e8b57188cd68c6a2b6bef295c4acc9
--hcatalog-database edu_ods \
--hcatalog-table itcast_clazz \
-m 1

# todo itcast_school 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
<<<<<<< HEAD
--query "select *,'2019-12-24' as dt from itcast_school where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
=======
--query "select * from itcast_school where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
>>>>>>> 224bc8d068e8b57188cd68c6a2b6bef295c4acc9
--hcatalog-database edu_ods \
--hcatalog-table itcast_school \
-m 1

# todo itcast_subject 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
<<<<<<< HEAD
--query "select *,'2019-12-24' as dt from itcast_subject where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
=======
--query "select * from itcast_subject where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
>>>>>>> 224bc8d068e8b57188cd68c6a2b6bef295c4acc9
--hcatalog-database edu_ods \
--hcatalog-table itcast_subject \
-m 1

# todo scrm_department 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/scrm?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
<<<<<<< HEAD
--query "select *,'2019-12-24' as dt from scrm_department where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
=======
--query "select * from scrm_department where 1=1 and create_date_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
>>>>>>> 224bc8d068e8b57188cd68c6a2b6bef295c4acc9
--hcatalog-database edu_ods \
--hcatalog-table scrm_department \
-m 1

# todo class_studying_student_count 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from class_studying_student_count where 1=1 and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table class_studying_student_count \
-m 1

# todo course_table_upload_detail 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from course_table_upload_detail where 1=1 and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table course_table_upload_detail \
-m 1

# todo student_leave_apply 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from student_leave_apply where 1=1 and create_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table student_leave_apply \
-m 1

# todo tbh_class_time_table 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from tbh_class_time_table where 1=1 and create_time between '2010-01-01 00:00:00' and '2019-12-24 23:59:59' and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table tbh_class_time_table \
-m 1

# todo tbh_student_signin_record 导入
/usr/bin/sqoop import "-Dorg.apache.sqoop.splitter.allow_text_splitter=true" \
--connect 'jdbc:mysql://106.75.33.59:3306/teach?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true' \
--username itcast_edu_stu \
--password itcast_edu_stu \
--query "select *,'2019-12-24' as dt from tbh_student_signin_record where 1=1 and  \$CONDITIONS" \
--hcatalog-database edu_ods \
--hcatalog-table tbh_student_signin_record \
-m 1